import cn.mybatis.SqlSessionFactoryUtil;
import cn.mybatis.dao.DeptMapper;
import cn.mybatis.entity.Dept;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import java.util.List;

/**
 * @author zhang peng yang ming
 * @create 2018-07-23 22:11
 */
public class DeptTest {
    @Test
    public void findAll() {
        SqlSession session = SqlSessionFactoryUtil.openSession();
        DeptMapper dao = session.getMapper(DeptMapper.class);
        List<Dept> deptList = dao.findAll();
        System.out.println(deptList.size());
        session.close();
    }
}
